﻿using farming.Admins.Dto;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace farming.Admins
{
    public interface IAdminService : IApplicationService
    {
        /// <summary>
        /// 创建用户
        /// </summary>
        /// <param name="adminDto"></param>
        /// <returns></returns>
        Task<RegisterResultDto> CreateAsync(CreateUpdateAdminDto registerDto);
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="adminDto"></param>
        /// <returns></returns>
        Task<LoginResultDto<PermissionDto>> LoginAsync(LoginDto adminDto);
        /// <summary>
        /// 获取当前登录用户信息
        /// </summary>
        /// <param name="Token"></param>
        /// <returns></returns>
        Task<ResultDto<AdminInfo>> Info(string Token);
        /// <summary>
        /// 初始化中间件数据
        /// </summary>
        /// <returns></returns>
        Task InitDataAsync();
        /// <summary>
        /// 分页
        /// </summary>
        /// <returns></returns>
        Task<ResultDto<PagedResultDto<AdminDto>>> PageAsync(QueryDto queryDto);
        /// <summary>
        /// 锁定用户
        /// </summary>
        /// <returns></returns>
        Task<ResultDto<AdminDto>> Lock(AdminDto dto);
        /// <summary>
        /// 行内编辑
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ResultDto<bool>> UpdateMobileAsync(AdminDto dto);
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultDto<AdminDto>> GetAsync(Guid id);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultDto<AdminDto>> DeleteAsync(Guid id);
        /// <summary>
        /// 刷新Token
        /// </summary>
        /// <param name="token"></param>
        /// <returns></returns>
        Task<ResultDto<string>> RefreshToken(string Token);
    }
}
